package com.vast.admin.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.gson.Gson;
import com.vast.admin.entity.BestsignCallback;
import com.vast.admin.entity.bestsign.BestsignCallbackEntity;
import com.vast.admin.mapper.BestsignCallbackMapper;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class BestsignCallbackService extends ServiceImpl<BestsignCallbackMapper, BestsignCallback> {
    private Gson gson = new Gson();
    public void save(BestsignCallbackEntity bestsignCallback) {
        BestsignCallback bestsignCallback1 = new BestsignCallback();
        bestsignCallback1.setContent(gson.toJson(bestsignCallback));
        bestsignCallback1.setCreateTime(new Date());
        super.save(bestsignCallback1);
    }

}
